<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:set var="ctx" value="${request.getContextPath()}"/>
<%
    StringBuffer url = request.getRequestURL();
    String currentCtx = url.delete(url.length() - request.getRequestURI().length(), url.length()).append("/").toString();
    currentCtx = currentCtx.substring(0, currentCtx.length() - 1);
    request.setAttribute("ctx", currentCtx);
%>
